package entities;

public class VM {
	private int id;
	private String NodeName;
	private int RightID;
	private String templateOuOS;
	private int hdd;
	private int ram;
	private int swap;
	private int cpu;
	private String ipAdress;
	private String name;
	private String state;
	private String login;
	private int vmProviderID;
	
	/**
	 * Si subnet vide, cela veut dire que la VM n'appartient pas a un subnet
	 */
	private int subnetID;
	
	public VM(int id, String nodeName, int rightID, String templateOuOS,
			int hdd, int ram, int swap, int cpu, String ipAdress, String name,
			String state, String login, int subnetID, int vmProviderID) {
		super();
		this.id = id;
		NodeName = nodeName;
		RightID = rightID;
		this.templateOuOS = templateOuOS;
		this.hdd = hdd;
		this.ram = ram;
		this.swap = swap;
		this.cpu = cpu;
		this.ipAdress = ipAdress;
		this.name = name;
		this.state = state;
		this.login = login;
		this.subnetID = subnetID;
		this.vmProviderID = vmProviderID;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNodeName() {
		return NodeName;
	}

	public void setNodeName(String nodeName) {
		NodeName = nodeName;
	}

	public int getRightID() {
		return RightID;
	}

	public void setRightID(int rightID) {
		RightID = rightID;
	}

	public String getTemplateOuOS() {
		return templateOuOS;
	}

	public void setTemplateOuOS(String templateOuOS) {
		this.templateOuOS = templateOuOS;
	}

	public int getHdd() {
		return hdd;
	}

	public void setHdd(int hdd) {
		this.hdd = hdd;
	}

	public int getRam() {
		return ram;
	}

	public void setRam(int ram) {
		this.ram = ram;
	}

	public int getSwap() {
		return swap;
	}

	public void setSwap(int swap) {
		this.swap = swap;
	}

	public int getCpu() {
		return cpu;
	}

	public void setCpu(int cpu) {
		this.cpu = cpu;
	}

	public String getIpAdress() {
		return ipAdress;
	}

	public void setIpAdress(String ipAdress) {
		this.ipAdress = ipAdress;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public int getVmProviderID() {
		return vmProviderID;
	}

	public void setVmProviderID(int vmProviderID) {
		this.vmProviderID = vmProviderID;
	}

	public int getSubnetID() {
		return subnetID;
	}

	public void setSubnetID(int subnetID) {
		this.subnetID = subnetID;
	}
	
	public void update(String nodeName, int RightID, String templateOuOS, int HDD, int RAM, int SWAP, 
			int CPU, String ip_Adress, String name, String state){
		
		this.setNodeName(nodeName);
		this.setRightID(RightID);
		this.setTemplateOuOS(templateOuOS);
		this.setHdd(HDD);
		this.setRam(RAM);
		this.setSwap(SWAP);
		this.setCpu(CPU);
		this.setIpAdress(ip_Adress);
		this.setName(name);
		this.setState(state);
	}
	
}
